package com.mbyte.easy.scheduling;

import com.mbyte.easy.admin.service.IVideoService;
import com.mbyte.easy.admin.service.impl.VideoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.io.PipedReader;

/**
 * @ClassName VideoScheduling
 * @Description: 视频的状态码的改变
 *
 * @Author:白章荣
 * @Date : 2019/12/14/17:40
*/
//@Configuration
//@EnableScheduling
public class VideoScheduling {
    private  Integer code=1001;
    private  Integer changeCode=1002;

@Autowired
private VideoServiceImpl videoService;

    /**
     * 一小时 自动执行一次  暂时先注掉 后期再解开
     */
    @Scheduled(fixedRate=3600000)
    public void videoChange(){ videoService.checkSttusCode(code,changeCode); }
}
